home *** CD-ROM | disk | FTP | other *** search
/ Total Network Tools 2002 / NextStepPublishing-TotalNetworkTools2002-Win95.iso / Archive / Web Server / Xitami Multithreaded Web Server.exe / ERRORS.GSL < prev    next >
Encoding:
Text File  |  2000-04-06  |  2.4 KB  |  58 lines

  1. .-----------------------------------------------------------------------------
  2. .-
  3. .-  errors.gsl - GSL script to format HTTP error messages
  4. .-
  5. .-  Written:  1999/05/30  Xitami team
  6. .-  Revised:  2000/01/01  Xitami team
  7. .-
  8. .-  If you want to modify this script, copy it, and modify the copy.  Then
  9. .-  change the server:error-script option to refer to your new script.
  10. .-
  11. .-  The root item has these attributes:
  12. .-      tempfile            name of temporary output file
  13. .-      errorcode           HTTP error code, as 3 digits
  14. .-      errortext           HTTP error text
  15. .-      message             More detailed cause of error, if any
  16. .-      date                current date, 'yyyy/mm/dd'
  17. .-      time                current time, 'hh:mm:ss'
  18. .-      script              name of script
  19. .-      urlbase             base URL for directory
  20. .-      server_software     name of the web server
  21. .-      server_version      the server version in use
  22. .-      server_name         the current host name
  23. .-      server_url          full url back to the server
  24. .-      server_port         port on which the web server is running
  25. .-      server_protocol     HTTP version in use (currently "HTTP/1.1").
  26. .-      remote_user         authorised username, if any, else "-"
  27. .-      remote_host         remote host name, "xxx.xxx.xxx.xxx"
  28. .-      Additionally, for each HTTP header field, an attribute HTTP_xxxx
  29. .-      where xxxx is the header field name. 
  30. .-
  31. .-  To debug changes to this script, start Xitami in debug mode (server:debug
  32. .-  option) and provoke an error.  This creates a file 'errors.xml' that you
  33. .-  can feed to gslgen by hand:
  34. .-
  35. .-      gslgen -script:templates/myfile.gsl errors.xml
  36. .-
  37. .-----------------------------------------------------------------------------
  38. .output tempfile
  39. <HTML><TITLE>Error</TITLE><BODY><H1>
  40. <HTML><BODY>
  41. <H2>Error $(errorcode)</H2>
  42. <H3>$(errortext:)</H3>
  43. .if defined (message)
  44. <P>$(message:)
  45. .endif
  46. <HR>
  47. <TABLE>
  48. <TR><TD>Server       </TD><TD>$(server_software:)</TD></TR>
  49. <TR><TD>Version      </TD><TD>$(server_version:)</TD></TR>
  50. <TR><TD>Name         </TD><TD>$(server_name:)</TD></TR>
  51. <TR><TD>Full URL     </TD><TD>$(server_url:)</TD></TR>
  52. <TR><TD>HTTP port    </TD><TD>$(server_port:)</TD></TR>
  53. <TR><TD>Protocol     </TD><TD>$(server_protocol:)</TD></TR>
  54. <TR><TD>Your IP      </TD><TD>$(remote_host:)</TD></TR>
  55. <TR><TD>Your browser </TD><TD>$(http_user_agent?:)</TD></TR>
  56. </TABLE>
  57. </BODY></HTML>
  58.